package com.boot.core.protocol

import com.alibaba.fastjson.JSON
import java.util.*

class OperateResponseForApp {

    val jsonrpc: String = "2.0"
//    val version: String = "20190221"
    var id: String = ""
    var result: OperateResultForApp? = null

    fun OperateResponseForApp(operations: ArrayList<OperateResponseForApp.OperateResultForApp.Operation>, code: Int, msg: String): Any {
        val sign: String = "singTag"
        this.result = OperateResultForApp(operations, code, msg, sign)
        return this
    }

    class OperateResultForApp(operations: ArrayList<OperateResponseForApp.OperateResultForApp.Operation>, code: Int, msg: String, sign: String) {
        var code: Int = code
        var msg: String = msg
        var data: ArrayList<Operation>? = operations
        var sign: String = sign

        class Operation(operationId: String, operationCode: String, operationMsg: String, operationNum: Int) {
            var operationId: String? = operationId
            var operationCode: String? = operationCode
            var operationMsg: String? = operationMsg
            var operationNum: Int? = operationNum

        }
    }

}